package com.yonyou.pmclouds.workstopreport.process;

import com.yonyou.pmclouds.basecom.bp.processor.SingleProcessor;
import com.yonyou.pmclouds.basecom.exception.BusinessException;
import com.yonyou.pmclouds.workstopreport.entity.WorkStopVO;

public class WorkStopInsertCheckProcessor implements SingleProcessor<WorkStopVO> {
    @Override
    public void process(WorkStopVO vo, WorkStopVO orig) throws BusinessException {
        if (null == vo) {
            throw new BusinessException("单据不能为空！");
        }
        if (null == vo.getStopDate()) {
            throw new BusinessException("停工日期不能为空！");
        }
        if (null == vo.getPreresumeDate()) {
            throw new BusinessException("预计复工日期不能为空");
        }
        if (null == vo.getWorkstopdays()) {
            throw new BusinessException("停工天数不能为空");
        }
        if (null == vo.getWorkstopreason()) {
            throw new BusinessException("停工原因不能为空");
        }
    }
}
